<%--
 *  File:    DistributortenderEdit.jsp
 *  @Author: only jin
 *  Date:    2009/10/22
 *
 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java"%>
<%@ page import="java.util.*"%>
<%@ page import="org.apache.log4j.Category"%>

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/oval-tag.tld" prefix="oval"%>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom"%>

<iframe name="reloadHandler" style="display:none"></iframe>
<%//init param
			String strPrivCode = (String) request.getParameter("third");
			if (strPrivCode == null)
				strPrivCode = (String) session.getAttribute("third");
			if (strPrivCode == null)
				strPrivCode = "";
			String privilegeCode = strPrivCode;
			String strModuleName = "OGM";
			String contextPath = request.getContextPath();
			
			
			
			//params
		     String viewflag = "";

		     if(pageContext.getAttribute("viewflag") != null&&((String)pageContext.getAttribute("viewflag")).equals("view")) {

		           viewflag = "view";
		     }


		    String strIsDefault = null;
			String paraIsDefault = "";
			String isTdNeed = "td-text";
			if("Y".equals(request.getParameter("isdefault"))) {
				strIsDefault = "&isdefault=Y";
				paraIsDefault = "Y";
				isTdNeed = "need";
			}else if ("N".equals(request.getParameter("isdefault"))) {
				strIsDefault = "&isdefault=N";
				paraIsDefault = "N";
			}
		  String isNew = request.getParameter("isNew");
		  if("Y".equals(request.getParameter("isNew"))) {
				isNew = "Y";
			}else if ("N".equals(request.getParameter("isNew"))) {
				isNew = "N";
			}else  {
				isNew = null;
			}
			

%>
<%@ include file="/inc/FrmDefault.inc" %>
<%@ include file="/inc/PageDefault.inc"%>

<html>
<iframe name="summaryfrm" scrolling="no" frameborder="0"
	style="position:absolute; top:0px; left:0px; display:none;border:#909eff 1px solid;"></iframe>
<head>
<title>DistributortenderEdit</title>

<PageFlow:CheckPageFlow pageName="p_distributortenderedit" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet"
	href="<%=contextPath %>/css/<%= strLanguageCode %>/main.css"
	type="text/css">
<script language="JavaScript" src="<%=contextPath %>/js/FuncLib.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/Calendar.js"></script>
<script language="JavaScript" src="<%=contextPath %>/js/ScriptLib.js"></script>
<%@ include file ="/inc/NewCalendar.inc" %>
<script language="JavaScript">



function setcontactname(contantelement){

	var code = contantelement.value;
  	var  datahandler = new  DataHandler() ;
  	datahandler.add_params("contactcode" , code,"string") ;
  	datahandler.add_params("languagecode" , 'cn',"string") ;
  	
  	datahandler.getResultFromHashMap("contactinfo" ,"contactcode" ,"document.frm.contactcode");
  	datahandler.getResultFromHashMap("contactinfo" ,"contactname" ,"document.frm.contactname");
  	datahandler.getResultFromHashMap("contactinfo" ,"contactid" ,"document.frm.contactid");
  	
  	datahandler.add_job("j_distributortenderedit") ;
    datahandler.runDataHandler ();
}
function set_contactNameByPopWindow(id,name,code){
	
	document.frm.doctorcode.value=code;
	document.frm.doctorname.value=name;
	document.frm.contactid.value=id;

}

function sethospitalname(contantelement){

	var code = contantelement.value;
  	var  datahandler = new  DataHandler() ;
  	datahandler.add_params("orgcode" , code,"string") ;
  	datahandler.add_params("languagecode" , 'cn',"string") ;
  	
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgcode" ,"document.frm.orgcode");
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgname" ,"document.frm.orgname");
  	datahandler.getResultFromHashMap("hospitalinfo" ,"orgid" ,"document.frm.orgid");
  	
  	datahandler.add_job("j_distributortenderedit") ;
    datahandler.runDataHandler ();
}

function set_orgNameByPopWindow(id,name,code){
	
	document.frm.orgcode.value=code;
	document.frm.orgname.value=name;
	document.frm.businessorgid.value=id;

}

function page_popwindow(){
  	if(popwindow!=null)
    	popwindow.close();
  	var strurl="<%=contextPath%>/masterdata/ogm/BusiAreaTreePop.jsp?<%= OvalTools.randomURL()%>&languagecode=<%=strLanguageCode%>"; 
  	var strStatus= "height=400,width=260,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no";
 	popwindow=window.open(strurl, "newwindow",strStatus);
}

function page_setBusinessArea(id,areaname,parentid){
  	frm.areaid.value=id;
  	frm.areaname.value=areaname;
}

function popWindowShowContactPage(){
	var url = "<%=contextPath%>/masterdata/ogm/popWindowContactInfo.jsp?"+"<%= OvalTools.randomURL() %>"+"&orgid=1&languagecode=<%=strLanguageCode%>";
	var windowAttribute = "height=400, width=800,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'ContactInfo',windowAttribute);
}

function popWindowShowHospitalPage(){
	var url = "<%=contextPath%>/masterdata/ogm/OrgPopWindow.jsp?"+"threadxcnt=0.06165288538971159"+"&globalpccode=100&orgid=1&languagecode=cn";
	var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}

function popSelectProductWindow(){
	//var url = "<%=contextPath%>/devlop/distributortender/ProdPopWindow.jsp?"+"threadxcnt=0.06165288538971159"+"&orgid=1&languagecode=cn";
	
	var id=document.frm.distributortenderid.value;
	var url = "<%=contextPath%>/devlop/distributortender/DistributortenderProd.jsp?"+"threadxcnt=0.06165288538971159"+"&distributortenderid="+id+"&orgid=1&languagecode=cn";
	var windowAttribute = "height=500, width=800,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}

function page_setProduct(id,code,name){
	frm.prodname.value=name;
}

function page_return(){
	//self.location.href='DistributortenderSummary.jsp?<%= OvalTools.randomURL() %>';
	parent.location.href = "DistributortenderSummary.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode%><%=JspHelper.filterNull( strIsDefault )%>";
}
	
function page_done()
{
  if(!checkForm(frm)) return;
  //var istender=document.frm.istender.value;
  //var purchasebegindate=document.frm.purchasebegindate.value;
  //var purchaseenddate=document.frm.purchaseenddate.value;
  //if(istender==1){
		//if(purchasebegindate==""){
			//alert("采购开始时间不能为空！");
			//return;
			//}
		//if(purchaseenddate==""){
			//alert("采购结束时间不能为空！");
			//return;
			//}
	  //}
  emptyToNull(frm);
  document.frm.actionname.value="save";
  document.frm.target="_parent";
  isRunning = true;
  document.frm.submit();
}	


function page_AreaAllWindow(){
	  var url = "<%=contextPath%>/zyl/masterdata/map/SelectAreaTree.jsp?"+"<%= OvalTools.randomURL() %>";
	  var windowAttribute = "height=400, width=600,top=100,left=100, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes";
	  if(popwindow!=null) popwindow.close();
	  popwindow = window.open(url,null,windowAttribute);
}

function setAreas(areaids,areanames,areacodes){
	document.frm.areaid.value = areaids;
	document.frm.areaname.value = areanames;
} 


function page_setProduct111(id,code,name,price,spec){	
	if(switchtype==3){
		frm.serproductid.value=id;
		frm.serproductcode.value=code;
		frm.serproductname.value=name;
	}else if(switchtype==6){
		frm.prodid.value=id;
		frm.prodcode.value=code;
		frm.prodname.value=name;
	}
	hiddenFrm();
}

var isHidden;
function frm_select(e,flag){
	switchtype=flag;
	isHidden = "block";
	var _target = getPosition(e);
    var _obj = document.getElementById("summaryfrm");
    _obj.style.left = _target.x;
    _obj.style.top = _target.y + e.clientHeight;
    _obj.style.height="250px";
    _obj.style.width="530px";
    _obj.style.zIndex = 5000;
    _obj.style.display = "block";
	var strUrl = "";	
	if(flag==1 || flag==4){
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=1&<%= OvalTools.randomURL() %>";
	}else if(flag==2 || flag==5){
		if(flag==5)_obj.style.left = _target.x-530;
		strUrl = "<%=contextPath %>/tdr/datatypein/OrgSelectPop.jsp?maxitem=8&globalpccode=2&<%= OvalTools.randomURL() %>";
	}else if(flag==3 || flag==6){
		_obj.style.height="300px";
		strUrl = "<%=contextPath %>/tdr/datatypein/ProdSelectPop.jsp?maxitem=10&<%= OvalTools.randomURL() %>";
	}
    document.summaryfrm.location.href = strUrl;
}
function getPosition(e) {
        var left = 0;
        var top = 0;
        while (e.offsetParent) {
            left += e.offsetLeft + (e.curentStyle? (parseInt(e.curentStyle.borderLeftWidth).NaN0()):0);
            top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
            e = e.offsetParent;
        }
        left += e.offsetLeft + (e.curentStyle ? (parseInt(e.curentStyle.borderLeftWidth)).NaN0() : 0);
        top += e.offsetTop + (e.curentStyle ? (parseInt(e.curentStyle.borderTopWidth)).NaN0() : 0);
        return {x:left, y:top};
}

function hiddenFrm(){
	document.getElementById("summaryfrm").style.display = "none";
}

function page_summary(actionvalue,orderbyname)
{
  var editform = summaryPrepare(frm,actionvalue,orderbyname);
  if(!editform) return;
  editform.action = "DistributortenderEdit.jsp?<%= OvalTools.randomURL() %>";
  editform.target = "_parent";
  isRunning = true;
  editform.submit();
}

function page_popUserwindow(blue)
{
  if (typeof popwindow != 'undefined') popwindow.close();
  //popwindow = window.open("<%=contextPath%>/biee/EmployeeBussiseForPop.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>","newwindow", "height=300, width=800,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
  popwindow = window.open("<%=contextPath%>/devlop/distributortender/DisEmployeeBussiseForPop.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>","newwindow", "height=300, width=800,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
}

function setSalesMan(userid,username,station,username1){
	document.frm.contactid.value=userid;
	document.frm.username.value=username;
	document.frm.station.value=station;
	document.frm.usergroupname.value=username1;
}

function page_selectCity(flag,grade)
{
  var regioncode = document.frm.regioncode.value;
  var parentcitycode = document.frm.citycode.value;
  if(flag=="city")parentcitycode='null';
  if(regioncode=="" || regioncode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  if(parentcitycode=="" || parentcitycode==-1){
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
  }
  var url='<%=contextPath %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode + '&flag=' + flag+'&grade='+grade;
  if(flag=="county"){
   url=url+'&parentcitycode='+parentcitycode;
  }
  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open(url,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');
}

function page_setCity(code,name,id,flag)
{
	if(flag == "county"){
		document.frm.countycode.value = code;
		document.frm.countyname.value = name;
		document.frm.countyid.value = id;
	}else {
		document.frm.citycode.value = code;
		document.frm.cityname.value = name;
		document.frm.cityid.value = id;
		document.frm.countycode.value = "";
    	document.frm.countyname.value = "";
    	document.frm.countyid.value = "";    	
	}
  if (popwindow != null)
    popwindow.close();
}


var popwindow;
function page_selectProvince()
{

  if(popwindow!=null)
    popwindow.close();
  popwindow = window.open('<%=contextPath %>/masterdata/ogm/RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN','newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');
}

function page_setRegion(code,name,id)
{
  if(code != document.frm.regioncode.value)
  {
    document.frm.citycode.value = "";
    document.frm.cityname.value = "";
    document.frm.cityid.value = "";
	document.frm.countycode.value = "";
    document.frm.countyname.value = "";
    document.frm.countyid.value = "";
  }
  document.frm.regioncode.value = code;
  document.frm.regionname.value = name;
  document.frm.regionid.value = id;
  if (popwindow != null)
    popwindow.close();
}

function page_submit()
{
  if(!checkForm(frm)) return; 	
  emptyToNull(document.frm);
  document.frm.actionname.value="submit";
  document.frm.target="_parent";
  isRunning = true;
  document.frm.submit();
}


function popSelectAreaWindow(){
	var id=document.frm.distributortenderid.value;
	var url = "<%=contextPath%>/devlop/distributortender/DistributortenderAreaSummary.jsp?&distributortenderid="+id+"&orgid=1&languagecode=cn";
	var windowAttribute = "height=300, width=600,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no";
  	if(popwindow!=null)
    popwindow.close();
  	popwindow = window.open(url,'hospitalinfo',windowAttribute);
}



function page_popBusinessarea()
{
  if (typeof popwindow != 'undefined') popwindow.close();
  popwindow = window.open("<%=contextPath%>/masterdata/ogm/zylstdbusinessareapop.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>","newwindow", "height=300, width=800,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
	
}

function setContact(id,type,name){
	document.frm.disregionid.value=id;
	document.frm.areaname.value=name;
}


</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" cellspacing="0" cellpadding="0">
	<tr>
		<td class="summary_top"></td>
	</tr>
</table>
<table width="100%" cellspacing="0" cellpadding="0">
	<form name="frm" method="post" action="../../Dispatcher"><input
		type="hidden" name="pagename" value="p_distributortenderedit"> <input
		type="hidden" name="actionname">
	<custom:hidden property="orgid" name="userinfo" scope="session"/>
	<custom:hidden property="userid" changedName="maker" name="userinfo" scope="session"/>
	<custom:hidden property="distributortenderid" name="distributortenderinfo" />
	 <input type="hidden" name="isNew" value="<%= isNew %>">
	<tr>
		<td valign="top">
		<table border="1" cellspacing="0" bordercolorlight="#999999"
			bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
			<span id="editbody">
			<tr>
				<td colspan="4" class="deepblue-left"><img
					src="../../images/<%= strLanguageCode %>/quote.gif">
			</tr>
			<%boolean isAuto = pageContext.getAttribute("isauto") != null
					&& pageContext.getAttribute("isauto").toString()
							.equalsIgnoreCase("Y");
			String codeClass = isAuto ? "td-text" : "need";
			String codeIsNull = isAuto ? "Y" : "N";
			String codeISDisabled = isAuto ? "true" : "false";

			%>
			
						<%
				 HashMap distributortenderinfo = (HashMap)pageContext.getAttribute("distributortenderinfo");
				 if(distributortenderinfo == null)
				  {
					 distributortenderinfo = new HashMap();
				  }
			%>
			<!-- --------------------------Row No: 1-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_DistributortenderCode") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:write name="distributortenderinfo" property="distributortendercode"/>&nbsp;
				</td>
				<td class="need"><%=label.getLabelName("L_DistributortenderName") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:text name="distributortenderinfo" property="distributortendername" command="notnull" label="L_DistributortenderName"/>
				</td>
			</tr>
			<!-- --------------------------Row No: 2-------------------------------------- -->
			<tr>
			

                			
			<!-- 2013-7-01  修改 -->
				<!-- 
				<td class="td-text"><%=label.getLabelName("L_Bid") +label.getLabelName("L_Region") +label.getLabelName("L_Colon")%></td>
				<%
				if(distributortenderinfo.get("distributortenderid")!=null){
				%>
				<td>
				   <a onclick="javascript:popSelectAreaWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %>			
				 -->

			<!-- 
			//2013-6-21 修改
				<td class="need"><%=label.getLabelName("L_VendorBusinessName") + label.getLabelName("L_Colon")%></td>
				<td><custom:text command="notnull" name="distributortenderinfo" property="orgcode"   label="L_BusinessOrg" onchange="javascript:sethospitalname(this);" readonly="true"/>
				<a onclick="javascript:popWindowShowHospitalPage();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a> 
				<custom:text name="distributortenderinfo" property="orgname" size="20" label="L_BusinessOrg" readonly="true"/>
				<custom:hidden name="distributortenderinfo" property="businessorgid" />
				</td>
			 -->			
				<!-- 
       		 	<%
        			String strPopWindow = "page_popwindow();";
        			//String strPopWindow = "page_AreaAllWindow();";
        		%>				
        		<td class="need"><%=label.getLabelName("L_BusinessAreaName") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:text  property="areaname" name="distributortenderinfo" size="20" readonly="true" />
					<a onclick="<%=strPopWindow%>">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/>
					</a>
					<custom:hidden  property="areaid" name="distributortenderinfo"/>
				</td>
				 -->
				 <!-- 2013-7-06  修改 -->
				<td class="need"><%=label.getLabelName("L_BidRegion")+label.getLabelName("L_Colon")%></td>
				<td><custom:text name="distributortenderinfo" property="disareaname" command="notnull" label="L_BidRegion"/></td>
				<td class="need"><%=label.getLabelName("L_Status") + label.getLabelName("L_Colon")%></td>
				<td>
					<custom:selectdic name="distributortenderinfo" property="status" dictType="Status" valueCriteria="111,112,113" />
				</td>
				 
				
			</tr>
			<!-- --------------------------Row No: 3-------------------------------------- -->
			<tr>
				
				<!-- 
				<td class="need"><%=label.getLabelName("L_DistributortenderStartDate")+ label.getLabelName("L_Colon")%></td>
				<td>
					<custom:text command="notnull" readonly="true" name="distributortenderinfo" property="begindate" label="L_DistributortenderStartDate"   dataType="date" dataFormatName="dateformat"/>
					<a onclick="show_calendar('frm.begindate','yyyy-MM-dd');">
					<custom:button type="3" label="L_Asterisk"	imgsrc="../../images/cn/Time.gif" border="0" /> </a>
				</td>
				 -->
				
				<td  class="need"><%= label.getLabelName("L_DistributortenderStartDate") + label.getLabelName("L_Colon") %></td>
	            <td>
	               <custom:text property="begindate"  dataType="date"  module="IMG" size="15" name="distributortenderinfo" command="notnull" label="L_DistributortenderStartDate"/>
	             <a onclick="javascript:c.show(this,'frm.begindate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
	            <!-- 
				<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
				<%
				if(distributortenderinfo.get("distributortenderid")!=null){
				%>
				<td>
				   <a onclick="javascript:popSelectProductWindow();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>
                <%}else{ %>
				<td>
				    <a onclick="alert('<%= message.getMessageDesc("SAVE_INFO_FIRST") %>');">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif"	border="0" /> </a>
                </td>                
                <%} %> 
                  
	             -->
				<td class="need"><%=label.getLabelName("L_TenderType")+ label.getLabelName("L_Colon")%></td>
				<td><custom:select name="distributortenderinfo" property="tenderconfigid" optionsName="configs" command="notnull" 
				label="L_AgreementType" optionValueKey="tenderconfigid" optionInnerTextKey="tenderconfigname"   defaultValueCost=""/> 
				</td>	             

					<!-- 
					<custom:text name="distributortenderinfo" property="prodname" label="L_Prodname" command="notnull" readonly="true"/>
					 -->
				<!-- 
				<td class="need"><%=label.getLabelName("L_Prodname")+ label.getLabelName("L_Colon")%></td>
				<td><custom:hidden property="prodid" />
				    <custom:hidden property="prodcode" /> 
				    <custom:text property="prodname" size="15"  name="distributortenderinfo"/>
				    <a onclick="javascript:frm_select(this,6);"><custom:button property="buttoner" type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a> 
				</td>
				 -->
			</tr>

			<!-- --------------------------Row No: 4-------------------------------------- -->
			<tr>
				<td class="need"><%=label.getLabelName("L_Purchase")+ label.getLabelName("L_Cycle")+label.getLabelName("L_Colon")%></td>
				<td><custom:text name="distributortenderinfo" property="purchasecycle"  command="notnull" label="L_Cycle"/></td>
				<!-- 
				 -->
				<td class="td-text"><%=label.getLabelName("L_Amount1")+ label.getLabelName("L_Colon")%></td>
				<td><custom:text name="distributortenderinfo" property="amount" label="L_PurchaseCycle"/></td>
			</tr>
			<!-- --------------------------Row No: 5-------------------------------------- -->
			<!-- 
			<tr>
				<td class="need"><%=label.getLabelName("L_IsTender")+ label.getLabelName("L_Colon")%></td>
				<td><custom:selectdic name="distributortenderinfo" property="istender" dictType="YesOrNo" valueCriteria="1-100" defaultValueCost=" "/></td>
				<td>&nbsp;</td>
	            <td>&nbsp;</td>

			</tr>
			 -->
			<!-- --------------------------Row No: 6-------------------------------------- -->
			<!-- 
			<%if(distributortenderinfo.get("istender")!=null && ((Integer)distributortenderinfo.get("istender")).intValue()==1){%>
			<tr>
				<td class="need"><%=label.getLabelName("L_Purchase")+label.getLabelName("L_StartTime")+ label.getLabelName("L_Colon")%></td>
				<td>
	               <custom:text property="purchasebegindate"  dataType="date"  module="IMG" size="15" name="distributortenderinfo"/>
	             <a onclick="javascript:c.show(this,'frm.purchasebegindate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td class="need"><%=label.getLabelName("L_Purchase")+label.getLabelName("L_EndTime") + label.getLabelName("L_Colon")%></td>
	            <td>
	               <custom:text property="purchaseenddate"  dataType="date"  module="IMG" size="15" name="distributortenderinfo" />
	             <a onclick="javascript:c.show(this,'frm.purchaseenddate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
			</tr>
			<%}else{ %>
			<tr>
				<td class="td-text"><%=label.getLabelName("L_Purchase")+label.getLabelName("L_StartTime")+ label.getLabelName("L_Colon")%></td>
				<td>
	               <custom:text property="purchasebegindate"  dataType="date"  module="IMG" size="15" name="distributortenderinfo" />
	             <a onclick="javascript:c.show(this,'frm.purchasebegindate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
				<td class="td-text"><%=label.getLabelName("L_Purchase")+label.getLabelName("L_EndTime") + label.getLabelName("L_Colon")%></td>
	            <td>
	               <custom:text property="purchaseenddate"  dataType="date"  module="IMG" size="15" name="distributortenderinfo" />
	             <a onclick="javascript:c.show(this,'frm.purchaseenddate','yyyy-MM-dd');"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a>
	            </td>
			</tr>			
			<%} %>
			 -->
			<!-- 
			 -->
			<!-- --------------------------Row No: 7-------------------------------------- -->
			
			<!-- 
				<td><custom:text name="distributortenderinfo" property="doctorcode"   label="L_ContactId" onchange="javascript:setcontactname(this);" readonly="true"/>
					<a onclick="javascript:popWindowShowContactPage();">
					<custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0" /></a> 
					<custom:text name="distributortenderinfo" property="doctorname" size="20" label="L_ContactId" readonly="true" />
					<custom:hidden name="distributortenderinfo" property="contactid" />
				</td>
			 -->
			 <tr>

			<!-- 
			<td class="td-text"><%= label.getLabelName("L_Province") + label.getLabelName("L_Colon") %></td>
			<td>
				   <custom:text property="regioncode" name="distributortenderinfo"  size="10" readonly="true"/>
	              <a onclick="javascript:page_selectProvince();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
	              <custom:text property="regionname" name="distributortenderinfo" readonly="true" size="20"/>
	              <custom:hidden property="regionid" name="distributortenderinfo" />
			</td>		
			 -->
            
            <td class="td-text"><%=label.getLabelName("L_ContactId") + label.getLabelName("L_Colon")%></td>
         		<td>
					<custom:hidden  name="distributortenderinfo" property="contactid"/>
					<%if(distributortenderinfo.get("username")!=null){%>
			           	<custom:text name="distributortenderinfo" property="username" size="20"/>
			           	<custom:hidden name="distributortenderinfo" property="usergroupname" />
					<%}else{ %>
			           	<custom:text name="distributortenderinfo" property="usergroupname" size="20"/>
			           	<custom:hidden name="distributortenderinfo" property="username" />
					<%} %>
		           	<custom:hidden name="distributortenderinfo" property="station"/>
              		<a onclick="page_popUserwindow();"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
         		</td>
				<td class="need"><%=label.getLabelName("L_Report1") +label.getLabelName("L_Province") +label.getLabelName("L_Colon")%></td>
				<td>
					<custom:hidden property="disregionid"  name="distributortenderinfo"/>
		           	<custom:text property="areaname" command="notnull" label="L_Report1" name="distributortenderinfo"/>
		           	<a onclick="page_popBusinessarea();"><custom:button type="3" value="*"/></a>
				</td>
			</tr>
			
			
			<!-- 
			<tr>
          	<td class="td-text"><%= label.getLabelName("L_City") + label.getLabelName("L_Colon") %></td>
          	<td>
            	<custom:text property="citycode" name="distributortenderinfo"  size="10" readonly="true"/>
            	<a onclick="javascript:page_selectCity('city',1);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
            	<custom:text property="cityname" name="distributortenderinfo" readonly="true" size="20"/>
            	<custom:hidden property="cityid" name="distributortenderinfo" />
            </td>
            <td class="td-text"><%= label.getLabelName("L_YLCounty") + label.getLabelName("L_Colon") %></td>
            <td >
              	<custom:text property="countycode"  name="distributortenderinfo" size="10" readonly="true" />
              	<a onclick="javascript:page_selectCity('county',2);"><custom:button type="3" label="L_Asterisk" imgsrc="flash.gif" border="0"/></a>
              	<custom:text property="countyname" name="distributortenderinfo" readonly="true" size="20"/>
              	<custom:hidden property="countyid" name="distributortenderinfo" />
            </td>
            						
			</tr>
			 -->

			<!-- --------------------------Row No: 8-------------------------------------- -->
			<tr>
            <td class="td-text"><%=label.getLabelName("L_Drugs") + label.getLabelName("L_Colon")%></td>
         		<td>
					<custom:select name="distributortenderinfo" property="dictionaryid" optionsName="dictionarys" 
				    optionValueKey="dictionaryid" optionInnerTextKey="valuename"   defaultValueCost=""/> 
         		</td>
				<td class="td-text">&nbsp;</td>
				<td>
					&nbsp;
				</td>
			</tr>			
			
			
			<!-- --------------------------Row No: 9-------------------------------------- -->

			<tr>
				<td class="td-text"><%=label.getLabelName("L_Instance") + label.getLabelName("L_Colon")%></td>
				<td colspan="3">
					<custom:textarea name="distributortenderinfo" property="instance" rows="2" cols="100"/>
				</td>
			</tr>


			<%--2003-5-16 11:14 kent add end--%>
		</table>
		</td>
	</tr>
	<!-- --------------------------Row No: 18-------------------------------------- -->
	<tr>
		<td class="summary_top"></td>
	</tr>
	<tr>
		<td height="49" class="td_center">
		<%if(distributortenderinfo.get("distributortenderid")==null){%>	
			<a onclick="page_done()"><custom:button type="1" label="L_Save" imgsrc="finish.gif" border="0" style="width:60" /></a>
			<a onclick="page_return()"><custom:button type="1" label="L_Back" border="0"  imgsrc="finish.gif" style="width:60" /></a>
		<%}else{ %>	
		    <a onclick="page_submit()"><custom:button type="1" label="L_Submit1" imgsrc="back.gif" border="0" style="width:60" /></a>
		    <a onclick="page_return()"><custom:button type="1" label="L_Back" border="0"  imgsrc="finish.gif" style="width:60" /></a>
		<%} %>
		</td>
	</tr>

</table>

</body>
</html>



